#ifndef __EX_RTC_H__
#define __EX_RTC_H__

#include <rthw.h>
#include <rtthread.h>
#include <rtdevice.h>
#include <board.h>
typedef struct
{
	uint32_t ts;
	char hhmm[8];
	char tmie[32];
	char timestamp[16];
} Rtc_Typedef;

extern Rtc_Typedef rtcTime;
struct extrtc_device
{
	struct rt_i2c_bus_device *i2c;
	rt_mutex_t lock;
	uint8_t AddrInput;
};
typedef struct extrtc_device *extrtc_device_t;

extern extrtc_device_t dev_extrtc;

extern rt_sem_t exrtc_sec_sem;

int rt_exrtc_config(void);
int get_local_time(Rtc_Typedef *rtc);
#endif
